package com.cxf.cxfzuul.service;

import com.cxf.cxfzuul.repository.User;
import org.springframework.stereotype.Service;

/**
 * description: UserService <br>
 * date: 2021/11/3 21:17 <br>
 * author: cxf <br>
 * version: 1.0 <br>
 */
@Service
public class UserService {


    public User findUserById(String userId) {
        User user = new User();
        user.setId("817309");
        user.setUsername("cxf'");
        user.setPassword("cxf123456");
        return user;
    }

    public User findByUsername(User user) {

        User user1 = new User();
        if("817309".equals(user.getId())){
            user1.setId("817309");
            user1.setUsername("cxf'");
            user1.setPassword("cxf123456");
            return user1;
        }else{
            return null;
        }
    }
}
